package com.ry.novel.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ry.novel.model.dto.BookInfo;
import com.ry.novel.model.dto.condition.BookQuery;

import java.util.List;

/**
 * @author ry
 * @since 2022-03-22 21:44
 **/
public interface BookService {
    /**
     * 分页查询小说接口
     * @param bookQuery
     * @return
     */
    Page<BookInfo> searchByPage(BookQuery bookQuery);

    BookInfo searchById(Long id);

    BookInfo queryById(Long bookId);

    void addBook(BookInfo bookInfo);

    void deleteBook(Long id);

    void updateBook(BookInfo bookInfo);


    List<BookInfo> queryAll();

    List<BookInfo> queryByAuthorId(Long id);

    List<BookInfo> queryByBookId(Long id);
}
